import {BaseEntity,Column,Entity,Index,JoinColumn,JoinTable,ManyToMany,ManyToOne,OneToMany,OneToOne,PrimaryColumn,PrimaryGeneratedColumn,RelationId} from "typeorm";


@Entity("mall_goods_gallery",{schema:"nest-mall" } )
@Index("goods_id",["goodsId",])
export class MallGoodsGallery {

    @PrimaryGeneratedColumn({
        type:"int", 
        name:"id"
        })
    id:number;
        

    @Column("int",{ 
        nullable:true,
        default: () => "'0'",
        name:"goods_id"
        })
    goodsId:number | null;
        

    @Column("longblob",{ 
        nullable:true,
        name:"img_url"
        })
    imgUrl:Buffer | null;
        

    @Column("varchar",{ 
        nullable:true,
        name:"img_desc"
        })
    imgDesc:string | null;
        

    @Column("int",{ 
        nullable:true,
        default: () => "'5'",
        name:"sort_order"
        })
    sortOrder:number | null;
        
}
